﻿@model ThuySan.Models.CategoryPropertyModel
@{
    Layout = "~/Areas/Backend/Views/Shared/_Dialog.cshtml";
    Html.EnableClientValidation();
}
@if (true == ViewBag.Completed)
{
    <script language="javascript">
        $(document).ready(function() {
            window.parent.closePopup(true);
        })
    </script>
}
else
{
    using (Html.BeginForm("AddProperty", "Category", FormMethod.Post, new {
                                                                                  enctype = "multipart/form-data"
                                                                          }))
    {
        @Html.HiddenFor(c => c.CategoryId)
        @Html.ValidationSummary()
        <div class="input-item">
            <label>
                Property</label>
            @Html.DropDownListFor(c => c.PropertyId, (IEnumerable<SelectListItem>) ViewBag.Properties, new {
                                                                                                                   style = "width: 300px;"
                                                                                                           })
        </div>
        <div class="input-item">
            <label>
                Priority</label>
            @Html.TextBoxFor(c => c.Priority, new {
                                                          @class = "text-input medium-input"
                                                  })
            @Html.ValidationMessageFor(c => c.Priority)
        </div>
        <input type="submit" value="Update" class="button" />
        <input type="reset" value="Reset" class="button" onclick=" javascript:window.parent.closePopup(); " />
    }
}